package com.ibeetl.cms.web.query;

import com.ibeetl.admin.core.annotation.Query;
import com.ibeetl.admin.core.util.Tool;
import com.ibeetl.admin.core.web.query.PageParam;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;
/**
 *SiteFunds查询
 * 站点经费资助
 */
public class SiteFundsQuery extends PageParam {
    private Integer id;

    private Long processUserId;

    private Integer companyId;
    private String businessState;


    @Query(name = "批准站文号", display = true,fuzzy=true)
    private String approvalNumber ;
    @Query(name = "年度", display = true)
    private String year;
    //@Query(name="创建日期",display=true,type=Query.TYPE_DATE_BETWEEN)
    private String date;

    private Date createDateMin;
    private Date createDateMax;

    //流程类型
    private String businessType;

    public String getBusinessType() {
        return businessType;
    }

    public void setBusinessType(String businessType) {
        this.businessType = businessType;
    }

   //单位名称
   private String unitName ;

    public Long getProcessUserId() {
        return processUserId;
    }

    public void setProcessUserId(Long processUserId) {
        this.processUserId = processUserId;
    }

    public Integer getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }

    public String getBusinessState() {
        return businessState;
    }

    public void setBusinessState(String businessState) {
        this.businessState = businessState;
    }

    public String getYear() {
        return year;
    }

    public void setYear(String year) {
        this.year = year;
    }

    public Integer getId(){
        return  id;
    }
    public void setId(Integer id ){
        this.id = id;
    }

    public String getApprovalNumber() {
        return approvalNumber;
    }

    public void setApprovalNumber(String approvalNumber) {
        this.approvalNumber = approvalNumber;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
        if(StringUtils.isEmpty(date)) {
            return ;
        }
        Date[] ds = Tool.parseDataRange(date);
        this.createDateMin=ds[0];
        this.createDateMax =ds[1];
    }

    public Date getCreateDateMin() {
        return createDateMin;
    }

    public void setCreateDateMin(Date createDateMin) {
        this.createDateMin = createDateMin;
    }

    public Date getCreateDateMax() {
        return createDateMax;
    }

    public void setCreateDateMax(Date createDateMax) {
        this.createDateMax = createDateMax;
    }

    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }
}
